// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'

import $ from 'jquery'

import Mint from 'mint-ui';

import 'mint-ui/lib/style.css';
import axios from './axios/axios';
import scroll from '@/components/scroll'

Vue.use(Mint);
Vue.component('scroll', scroll);
Vue.config.productionTip = false;

/* eslint-disable no-new */
Vue.filter("jsonImgShow", function(value) {
    return JSON.parse(value)[0];
});

new Vue({
  el: '#app',
  router,
  template: '<App/>',
  components: { App },
  methods: {
    tokenValidat(token, cb) {
      var data = JSON.stringify({
        'data': [token],
        'controllerName': 'userToken',
        'actionName': 'validate'
      });
      axios.postAdmain({
        data:data,
        callback(res){
          cb(res.data.data);
        }
      });
    }
  },
});
